package kr.hkit.androidcomplete01;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import kr.hkit.androidcomplete01.chapter06.Ch06MainActivity;
import kr.hkit.androidcomplete01.chapter07.Ch07MainActivity;
import kr.hkit.androidcomplete01.chapter08.Ch08MainActivity;
import kr.hkit.androidcomplete01.chapter09.Ch09MainActivity;
import kr.hkit.androidcomplete01.chapter10.Ch10MainActivity;
import kr.hkit.androidcomplete01.chapter11.Ch11MainActivity;

public class MainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	 
	public void mOnClick(View v){
		Intent intent = null;
		switch(v.getId()){
		case R.id.main_btn01:
			intent = new Intent(this, Ch06MainActivity.class);
			break;
		case R.id.main_btn02:
			intent = new Intent(this, Ch07MainActivity.class);
			break;
		case R.id.main_btn03:
			intent = new Intent(this, Ch08MainActivity.class);
			break;
		case R.id.main_btn04:
			intent = new Intent(this, Ch09MainActivity.class);
			break;
		case R.id.main_btn05:
			intent = new Intent(this, Ch10MainActivity.class);
			break;
		case R.id.main_btn06:
			intent = new Intent(this, Ch11MainActivity.class);
			break;
		}
		startActivity(intent);
	}
}

